package cn.cat.main.others;

public class RunnableClass {

    public static void main(String[] args) {

        /*
        * 该方式不推荐在线上项目中使用
        * */
        for (int i = 0; i < 10; i++) {
            Thread thread = new Thread(new Runnable() {

                public void run() {
                    System.out.println("任务开始执行");
                }
            });
            thread.start();
        }
    }
}
